#ifndef _FL_SERVER_SELECT_SCENE_H__
#define _FL_SERVER_SELECT_SCENE_H__

#include "cocos2d.h"
#include "ui/UIText.h"

#define SERVER_LIST_NAME_LABEL_COUNT	8
class ServerSelectScene : public cocos2d::Layer
{
public:
	ServerSelectScene();
	~ServerSelectScene();
	// Here's a difference. Method 'init' in cocos2d-x returns bool, instead of returning 'id' in cocos2d-iphone
	virtual bool init();

	// there's no 'id' in cpp, so we recommend returning the class instance pointer
	static cocos2d::Scene* scene();

	static ServerSelectScene* getInstance();

	void eventCloseButton(cocos2d::Ref* sender, cocos2d::ui::TouchEventType type);
	void eventServerNameLabel(cocos2d::Ref* sender, cocos2d::ui::TouchEventType type);
	/*void eventLoginButton(cocos2d::Ref* sender, cocos2d::ui::TouchEventType type);
	void eventAccountText(cocos2d::Ref* sender, cocos2d::ui::TextFiledEventType type);
	void eventPasswordText(cocos2d::Ref* sender, cocos2d::ui::TextFiledEventType type);

	void eventKeyboardPressed(cocos2d::EventKeyboard::KeyCode, cocos2d::Event*);*/
	// a selector callback
	//void menuCloseCallback(Ref* sender);

	// implement the "static node()" method manually
	CREATE_FUNC(ServerSelectScene);

	void setServerMessage(const std::string& msg);
	void setServerNameCapacity(int idx, const std::string& name, int cap);

private:
	//void doLogin();

private:
	static ServerSelectScene* m_pInstance;
	cocos2d::ui::Text* m_pServerMsgLabel;
	cocos2d::ui::Text* m_pServerNameLabel[SERVER_LIST_NAME_LABEL_COUNT];

	//cocos2d::ui::TextField* m_pAccountText;
	//cocos2d::ui::TextField* m_pPasswordText;
	//cocos2d::ui::TextField* m_pCurrentText;
};

#endif